<template>
    <div class="cart-view">
        <!-- 导航栏 -->
        <cateNavbar :title="title"/>

        <!-- 购物车列表 -->
        <CartList :cartlist="cartList"/>
    </div>
</template>

<script setup lang="ts">
import cateNavbar from '@/components/dmx/cate-navbar.vue';
import CartList from '@/components/dmx/cart-list.vue';
import { ref } from 'vue';
import { useCartStore } from '@/stores';
// import { useRouter } from 'vue-router';
import { storeToRefs } from 'pinia';
// const router = useRouter();

// 获取购物车列表
const cartStore = useCartStore();
const {cartList} = storeToRefs(cartStore)

// 标题
const title = ref("购物车");
</script>

<style>
.cart-view{
    width: 100vw;
    /* height: 100vh; */
    background-color: rgb(247,247,247);
}

</style>

